package com.qingzhuge.file.entity;

import com.qingzhuge.entity.BasePkLongEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * @author : zero.xiao
 * @description : 文件
 * @date :2018/6/14 0014 下午 17:33
 * @modified :
 * @since : 1.0.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_file")
public class SysFile extends BasePkLongEntity {
    private static final long serialVersionUID = -6322269204662293915L;
    /**文件媒体类型*/
    private String contentType;
    /**文件地址*/
    private String url;
    /**文件大小*/
    private Long length;
    /**文件描述*/
    private String description;
    /**文件后缀*/
    private String suffix;
    /**上传用户id*/
    private Long uid;
    /**文件权限类型，用于是否可以匿名下载，0=可匿名下载，1不可匿名下载*/
    private Integer authType;
    public SysFile() {
    }

    public SysFile(Integer authType) {
        this.authType = authType;
    }

    public SysFile(String id, Integer authType) {
        super(id);
        this.authType = authType;
    }
}
